package com.zch.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.item.util.QueryParams;
import com.item.util.QueryParams.Builder;
import com.zch.dao.PrincipalMapper;
import com.zch.dao.model.Principal;
import com.zch.dao.model.PrincipalExample;
import com.zch.daoEx.PrincipalMapperEx;
import com.zch.daoEx.model.PrincipalEx;

@Service
public class PrincipalService {
	@Autowired
	private PrincipalMapper principalMapper;
	@Autowired
	private PrincipalMapperEx principalMapperEx;

	public int countByExample(PrincipalExample example) {
		return this.principalMapper.countByExample(example);
	}

	public Principal selectByPrimaryKey(String id) {
		return this.principalMapper.selectByPrimaryKey(id);
	}

	public List<Principal> selectByExample(PrincipalExample example) {
		return this.principalMapper.selectByExample(example);
	}

	public int deleteByPrimaryKey(String id) {
		return this.principalMapper.deleteByPrimaryKey(id);
	}

	public int updateByPrimaryKeySelective(Principal record) {
		return this.principalMapper.updateByPrimaryKeySelective(record);
	}

	public int updateByPrimaryKey(Principal record) {
		return this.principalMapper.updateByPrimaryKey(record);
	}

	public int deleteByExample(PrincipalExample example) {
		return this.principalMapper.deleteByExample(example);
	}

	public int updateByExampleSelective(Principal record, PrincipalExample example) {
		return this.principalMapper.updateByExampleSelective(record, example);
	}

	public int updateByExample(Principal record, PrincipalExample example) {
		return this.principalMapper.updateByExample(record, example);
	}

	public int insert(Principal record) {
		return this.principalMapper.insert(record);
	}

	public int insertSelective(Principal record) {
		return this.principalMapper.insertSelective(record);
	}

	public List<PrincipalEx> selectList(QueryParams.Builder builder){
		return this.principalMapperEx.selectList(builder);
	}

    public PrincipalEx selectAppDetailLists(String id) {
        return this.principalMapperEx.selectAppDetailLists(id);
    }

    public List<PrincipalEx> selectMyList(Map<String, Object> map) {
        return this.principalMapperEx.selectMyList(map);
    }

    public List<PrincipalEx> selectAppList(Map<String, Object> map) {
        return this.principalMapperEx.selectAppList(map);
    }

    public int cancleTops(Map<String, Object> map) {
        return this.principalMapperEx.cancleTops(map);
    }

    
}
